package com.card.manager.services;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.card.framework.mybatis.optimist.ModifiedByAnotherUserException;
import com.card.framework.page.model.PageModel;
import com.card.manager.domain.Roles;
import com.card.manager.domain.Users;

public interface UserService {

	public int findUser(String username , String password , String dbKey) ;

	public void updateUser(Users UserBean) ;

	public void deleteUser(Long id) ;
	
	public void insertUser(Users UserBean) ;

	public int updatePassword(String username,String opass,String npass);
	
	public Map<String, Object> selectUserForPage(String currUsername,Users user,PageModel pageModel);
	
	public Users getById(int id);
	
	public void deleteUsers(List<Users> users) throws ModifiedByAnotherUserException, Exception;
	
	public boolean isExistUsername(String username);
	
	public void insertRoles(int userid,Set<Roles> roles);
}
